﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FubiManger.Cashier
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱，true添加，false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class cashordcontrol : Smobiler.Core.Controls.MobileUserControl
    {
        public cashordcontrol() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }

        private void btninfo_Press(object sender, EventArgs e)
        {
            DialogOptions options = new DialogOptions(LayoutJustifyAlign.FlexEnd);
            options.Padding = Padding.Empty;
            cashordercontrol con = new cashordercontrol();
            con.ordsn = lbl_sn.Text;
            this.Form.ShowDialog(con, options, (obj, args) =>
            {
                ((CashierForm)this.Form).Resfh();
            });
        }

        private void cashordcontrol_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(lbldisksn.Text))
            {
                lbldisksn.Text = "位置：" + lbldisksn.Text;//餐桌号                
            }
            else
            {
                if (lblis_online.Text == "1")
                    lbldisksn.Text = "线上订单";
                else
                    lbldisksn.Text = "线下订单";
            }
            if (lblu_sage.Text == "1")
                lblu_sage.Text = "到店";
            else if (lblu_sage.Text == "2")
                lblu_sage.Text = "物流";
            lblordsn.Text = "订单号：" + lbl_sn.Text;
        }
    }
}